// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.contest {
  @_top: contest;
  background-color: @osu-colour-b5;
  color: @osu-colour-c1;

  &__description {
    .default-gutter-v2();
    .content-font();

    background-color: @osu-colour-b4;
    font-size: 14px;
    padding-top: 20px;
    padding-bottom: 20px;

    > h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      color: @osu-colour-c1;
    }
  }

  &__countdown-timer {
    background-color: @osu-colour-b4;
    padding-bottom: 20px;
    margin-top: -10px;
  }

  &__voting-notice {
    color: white;
    text-align: center;
    padding: 20px;
  }

  &__accordion {
    background: @osu-colour-b5;
    padding: 20px;
  }

  &__group {
    margin: 10px auto;
    max-width: 600px;
    background: @osu-colour-b4;
    border: none;
    .default-box-shadow();
  }

  &__art-list {
    padding: 0px 20px;
  }

  &__group-heading {
    display: flex;
    justify-content: space-between;
    padding: 10px;

    color: white;
    &:hover,
    &:visited,
    &:link,
    &:active {
      color: white;
      text-decoration: none;
    }
  }

  &__section-toggle {
    transition: all 300ms;
    transform: rotateZ(0deg);
    .@{_top}__group-heading[aria-expanded="true"] & {
      transform: rotateZ(180deg);
    }
  }

  &__buttons {
    text-align: center;
    padding: 20px 0;
  }

  &__vote-summary {
    &--art {
      font-size: 10px;
      padding-top: 10px;
      margin-bottom: 5px;
      text-align: right;
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }
  }

  &__vote-summary-text {
    float: right;
    text-transform: uppercase;
    color: @osu-colour-f1;
    font-weight: bold;
    height: 16px;
    display: flex;
    align-items: center;
    width: 32px;
    &--art {
      width: inherit;
      margin-right: 10px;
    }
  }

  &__vote-count {
    display: flex;
    align-items: center;
    flex: 0 0 110px;
    text-align: right;
    background-color: @osu-colour-b6;
    justify-content: flex-end;
    padding-right: 5px;
    font-size: 11px;

    &--no-percentages {
      flex: 0 0 70px;
    }
  }

  &__voting-star {
    display: flex;
    flex: 0 0 32px;
    margin-left: auto;
    .center-content();
    color: rgba(1, 1, 1, 0.5);

    &:hover,
    &:focus {
      color: rgba(1, 1, 1, 0.75);
      font-size: inherit;
      text-decoration: none;
    }

    &--art {
      flex: none;
      position: relative;
      margin: auto 0 0 auto;
      padding: 10%;
    }

    &--dark-bg {
      background-color: @osu-colour-b6;
    }

    &--selected {
      font-size: inherit;
      color: @contest-selected-colour;
      &:hover,
      &:focus {
        color: fade(@contest-selected-colour, 75%);
      }
    }

    &--selected-art {
      font-size: inherit;
      color: white;
      &:hover,
      &:focus {
        color: fade(white, 50%);
      }
    }

    &--smaller {
      width: 16px;
      height: 16px;
    }

    &--float-right {
      float: right;
    }

    &--spin {
      animation: spin-w-easing 1s ease-in-out infinite;
    }
  }
}
